#include<stdio.h>
int main()
{
	char ch;
	scanf("%c",&ch);
	if(ch>='a'&&ch<='z') {
		printf("lower\n");
	}
	else if(ch>='A'&&ch<='Z') {
		printf("upper\n");
	}
	else if(ch>='0'&&ch<='9') {
		printf("digit\n");
	}
	else {
		printf("other\n");
	}
	return 0;
}
